package cn.wolfcode.crm.service;

import cn.wolfcode.crm.domain.Employee;
import cn.wolfcode.crm.query.QueryObject;
import cn.wolfcode.crm.util.PageResult;

import java.util.List;

public interface IEmployeeService {
    int insert(Employee record);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();

    int updateByPrimaryKey(Employee record);

    PageResult query(QueryObject qo);

    /**
     * 验证用户名是否已经存在
     * 如果存在返回false
     * 不存在返回true
     * @param username
     * @return
     */
    Boolean validateName(String username,Long id);

    /**
     * 设置离职状态
     * @param id
     */
    void changeState(Long id);

    Employee selectByUsername(String username);
}
